﻿@helper PreScript(string bundle)
{
}
@helper PostScript(string bundle)
{
    if(bundle == "base")
    {
        <script type="text/javascript">
            jQuery(document).ready(function () {
                jQuery('.confirm').click(function () {
                    return confirm('@T(Res.In("Common").Of("Expr").Name("AreYouSure"))');
                });
                jQuery('.autohide-60').delay(60000).hide(1000);
                jQuery('.button').button();
                jQuery('.button.state-disabled').button('option', {
                     disabled: true
                });
                jQuery('.buttonset').buttonset();
            });
            jQuery.datepicker.setDefaults({
                closeText: '@T(Res.In("jQuery").Of("DatePicker").Name("Close"))',
                prevText: '@T(Res.In("jQuery").Of("DatePicker").Name("Previous"))',
                nextText: '@T(Res.In("jQuery").Of("DatePicker").Name("Next"))',
                currentText: '@T(Res.In("jQuery").Of("DatePicker").Name("Today"))',
                monthNames:
                [
                    '@T(Res.In("jQuery").Of("DatePicker").Name("January"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("February"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("March"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("April"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("May"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("June"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("July"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("August"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("September"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("October"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("November"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("December"))'
                ],
                monthNamesShort:
                [
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Jan"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Feb"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Mar"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Apr"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("May"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Jun"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Jul"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Aug"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Sep"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Oct"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Nov"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Dec"))'
                ],
                dayNames:
                [
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Sunday"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Monday"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Tuesday"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Wednesday"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Thursday"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Friday"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Saturday"))'
                ],
                dayNamesShort:
                [
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Sun"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Mon"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Tue"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Wed"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Thu"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Fri"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Sat"))'
                ],
                dayNamesMin:
                [
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Su"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Mo"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Tu"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("We"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Th"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Fr"))',
                    '@T(Res.In("jQuery").Of("DatePicker").Name("Sa"))'
                ],
                weekHeader: '@T(Res.In("jQuery").Of("DatePicker").Name("Week"))',
                dateFormat: '@JDM.String(Context.Svc().Localization.Country.DateFormat).ToLowerInvariant().Replace("yy", "y")',
                firstDay: 1,
                isRTL: false,
                showMonthAfterYear: false,
                yearSuffix: ''
            });
        </script>
    }
    else if(bundle == "jquery_validate")
    {
        <script type="text/javascript">
            jQuery.validator.setDefaults({
                errorClass: 'validate-error',
                validClass: 'validate-success',
                errorElement: 'span'
            });
            jQuery.validator.addMethod(
                "regex",
                function (value, element, regexp) {
                    var re = new RegExp(regexp);
                    return this.optional(element) || re.test(value);
                },
                '@T(Res.In("jQValidate").Of("Error").Name("Regex"))'
            );
            jQuery.extend(jQuery.validator.messages, {
                required: '@T(Res.In("jQValidate").Of("Error").Name("Required"))',
                email: '@T(Res.In("jQValidate").Of("Error").Name("Email"))',
                digits: '@T(Res.In("jQValidate").Of("Error").Name("Digits"))',
                number: '@T(Res.In("jQValidate").Of("Error").Name("Number"))',
                equalTo: '@T(Res.In("jQValidate").Of("Error").Name("EqualTo"))'
            });
        </script>
    }
    else if(bundle == "jquery_timepicker")
    {
        string timeFormat = JDM.String(Context.Svc().Localization.Country.TimeFormat).ToLowerInvariant();
        bool ampm = timeFormat.Contains("tt");
        <script type="text/javascript">
            jQuery.timepicker.setDefaults({
                timeOnlyTitle: '@T(Res.In("jQTmPicker").Of("Picker").Name("TimeOnly"))',
                currentText: '@T(Res.In("jQTmPicker").Of("Picker").Name("Now"))',
                timeText: '@T(Res.In("jQTmPicker").Of("Picker").Name("Time"))',
                hourText: '@T(Res.In("jQTmPicker").Of("Picker").Name("Hour"))',
                minuteText: '@T(Res.In("jQTmPicker").Of("Picker").Name("Minute"))',
                secondText: '@T(Res.In("jQTmPicker").Of("Picker").Name("Second"))',
                millisecText: '@T(Res.In("jQTmPicker").Of("Picker").Name("Millisecond"))',
                closeText: '@T(Res.In("jQTmPicker").Of("Picker").Name("Close"))',
                timeFormat: '@timeFormat',
                ampm: @ampm.ToString().ToLowerInvariant()
            });
        </script>
    }
    else if(bundle == "ckeditor")
    {
        <script type="text/javascript">
            CKEDITOR.config.language = 'current';
            CKEDITOR.lang.current = {
                editorTitle: '@T(Res.In("CKEditor").Of("Editor").Name("Title"))',
                toolbars: '@T(Res.In("CKEditor").Of("Editor").Name("Toolbars"))',
                editor: '@T(Res.In("CKEditor").Of("Editor").Name("Title"))',
                source: '@T(Res.In("CKEditor").Of("Editor").Name("Source"))',
                newPage: '@T(Res.In("CKEditor").Of("Editor").Name("NewPage"))',
                preview: '@T(Res.In("CKEditor").Of("Editor").Name("Preview"))',
                cut: '@T(Res.In("CKEditor").Of("Editor").Name("Cut"))',
                copy: '@T(Res.In("CKEditor").Of("Editor").Name("Copy"))',
                paste: '@T(Res.In("CKEditor").Of("Editor").Name("Paste"))',
                print: '@T(Res.In("CKEditor").Of("Editor").Name("Print"))',
                underline: '@T(Res.In("CKEditor").Of("Editor").Name("Underline"))',
                bold: '@T(Res.In("CKEditor").Of("Editor").Name("Bold"))',
                italic: '@T(Res.In("CKEditor").Of("Editor").Name("Italic"))',
                selectAll: '@T(Res.In("CKEditor").Of("Editor").Name("SelectAll"))',
                removeFormat: '@T(Res.In("CKEditor").Of("Editor").Name("RemoveFormat"))',
                strike: '@T(Res.In("CKEditor").Of("Editor").Name("StrikeThrough"))',
                subscript: '@T(Res.In("CKEditor").Of("Editor").Name("Subscript"))',
                superscript: '@T(Res.In("CKEditor").Of("Editor").Name("Superscript"))',
                horizontalrule: '@T(Res.In("CKEditor").Of("Editor").Name("HorizontalLine"))',
                pagebreak: '@T(Res.In("CKEditor").Of("Editor").Name("PageBreak"))',
                pagebreakAlt: '@T(Res.In("CKEditor").Of("Editor").Name("PageBreakAlt"))',
                unlink: '@T(Res.In("CKEditor").Of("Editor").Name("Unlink"))',
                undo: '@T(Res.In("CKEditor").Of("Editor").Name("Undo"))',
                redo: '@T(Res.In("CKEditor").Of("Editor").Name("Redo"))',
                common: {
                    browseServer: '@T(Res.In("CKEditor").Of("Editor").Name("CommonBrowseServer"))',
                    url: '@T(Res.In("CKEditor").Of("Editor").Name("CommonUrl"))',
                    protocol: '@T(Res.In("CKEditor").Of("Editor").Name("CommonProtocol"))',
                    upload: '@T(Res.In("CKEditor").Of("Editor").Name("CommonUpload"))',
                    uploadSubmit: '@T(Res.In("CKEditor").Of("Editor").Name("CommonUploadSubmit"))',
                    image: '@T(Res.In("CKEditor").Of("Editor").Name("CommonImage"))',
                    flash: '@T(Res.In("CKEditor").Of("Editor").Name("CommonFlash"))',
                    notSet: '@T(Res.In("CKEditor").Of("Editor").Name("CommonNotSet"))',
                    id: '@T(Res.In("CKEditor").Of("Editor").Name("CommonId"))',
                    name: '@T(Res.In("CKEditor").Of("Editor").Name("CommonName"))',
                    langDir: '@T(Res.In("CKEditor").Of("Editor").Name("CommonLangDir"))',
                    langDirLtr: '@T(Res.In("CKEditor").Of("Editor").Name("CommonLangDirLtr"))',
                    langDirRtl: '@T(Res.In("CKEditor").Of("Editor").Name("CommonLangRtl"))',
                    langCode: '@T(Res.In("CKEditor").Of("Editor").Name("CommonLangCode"))',
                    longDescr: '@T(Res.In("CKEditor").Of("Editor").Name("CommonLongDescr"))',
                    cssClass: '@T(Res.In("CKEditor").Of("Editor").Name("CommonCssClass"))',
                    advisoryTitle: '@T(Res.In("CKEditor").Of("Editor").Name("CommonAdvTitle"))',
                    cssStyle: '@T(Res.In("CKEditor").Of("Editor").Name("CommonCssStyle"))',
                    ok: '@T(Res.In("CKEditor").Of("Editor").Name("CommonOK"))',
                    cancel: '@T(Res.In("CKEditor").Of("Editor").Name("CommonCancel"))',
                    close: '@T(Res.In("CKEditor").Of("Editor").Name("CommonClose"))',
                    preview: '@T(Res.In("CKEditor").Of("Editor").Name("CommonPreview"))',
                    generalTab: '@T(Res.In("CKEditor").Of("Editor").Name("CommonGeneral"))',
                    advancedTab: '@T(Res.In("CKEditor").Of("Editor").Name("CommonAdvanced"))',
                    validateNumberFailed: '@T(Res.In("CKEditor").Of("Editor").Name("CommonValidateNumFailed"))',
                    confirmNewPage: '@T(Res.In("CKEditor").Of("Editor").Name("CommonConfirmNewPage"))',
                    confirmCancel: '@T(Res.In("CKEditor").Of("Editor").Name("CommonConfirmCancel"))',
                    options: '@T(Res.In("CKEditor").Of("Editor").Name("CommonOptions"))',
                    target: '@T(Res.In("CKEditor").Of("Editor").Name("CommonTarget"))',
                    targetNew: '@T(Res.In("CKEditor").Of("Editor").Name("CommonTargetNew"))',
                    targetTop: '@T(Res.In("CKEditor").Of("Editor").Name("CommonTargetTop"))',
                    targetSelf: '@T(Res.In("CKEditor").Of("Editor").Name("CommonTargetSelf"))',
                    targetParent: '@T(Res.In("CKEditor").Of("Editor").Name("CommonTargetParent"))',
                    langDirLTR: '@T(Res.In("CKEditor").Of("Editor").Name("CommonLangDirLtr"))',
                    langDirRTL: '@T(Res.In("CKEditor").Of("Editor").Name("CommonLangRtl"))',
                    styles: '@T(Res.In("CKEditor").Of("Editor").Name("CommonCssStyle"))',
                    cssClasses: '@T(Res.In("CKEditor").Of("Editor").Name("CommonCssClass"))',
                    width: '@T(Res.In("CKEditor").Of("Editor").Name("CommonWidth"))',
                    height: '@T(Res.In("CKEditor").Of("Editor").Name("CommonHeight"))',
                    align: '@T(Res.In("CKEditor").Of("Editor").Name("CommonAlign"))',
                    alignLeft: '@T(Res.In("CKEditor").Of("Editor").Name("CommonAlignLeft"))',
                    alignRight: '@T(Res.In("CKEditor").Of("Editor").Name("CommonAlignRight"))',
                    alignCenter: '@T(Res.In("CKEditor").Of("Editor").Name("CommonAlignCenter"))',
                    alignTop: '@T(Res.In("CKEditor").Of("Editor").Name("CommonAlignTop"))',
                    alignMiddle: '@T(Res.In("CKEditor").Of("Editor").Name("CommonAlignMiddle"))',
                    alignBottom: '@T(Res.In("CKEditor").Of("Editor").Name("CommonAlignBottom"))',
                    invalidHeight: '@T(Res.In("CKEditor").Of("Editor").Name("CommonInvalidHeight"))',
                    invalidWidth: '@T(Res.In("CKEditor").Of("Editor").Name("CommonInvalidWidth"))',
                    invalidCssLength: '@T(Res.In("CKEditor").Of("Editor").Name("CommonInvalidCssLength"))',
                    invalidHtmlLength: '@T(Res.In("CKEditor").Of("Editor").Name("CommonInvalidHtmlLength"))',
                    unavailable: '@T(Res.In("CKEditor").Of("Editor").Name("CommonUnavailable"))'
                },
                contextmenu: {
                    options: '@T(Res.In("CKEditor").Of("Editor").Name("CtxMenuOptions"))'
                },
                specialChar: {
                    toolbar: '@T(Res.In("CKEditor").Of("Editor").Name("SpecialChar"))',
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("SpecialChar"))',
                    options: '@T(Res.In("CKEditor").Of("Editor").Name("SpecialCharOpt"))'
                },
                link: {
                    toolbar: '@T(Res.In("CKEditor").Of("Editor").Name("Link"))',
                    other: '@T(Res.In("CKEditor").Of("Editor").Name("LinkOther"))',
                    menu: '@T(Res.In("CKEditor").Of("Editor").Name("Link"))',
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("Link"))',
                    info: '@T(Res.In("CKEditor").Of("Editor").Name("LinkInfo"))',
                    target: '@T(Res.In("CKEditor").Of("Editor").Name("LinkTarget"))',
                    upload: '@T(Res.In("CKEditor").Of("Editor").Name("LinkUpload"))',
                    advanced: '@T(Res.In("CKEditor").Of("Editor").Name("LinkAdvanced"))',
                    type: '@T(Res.In("CKEditor").Of("Editor").Name("LinkType"))',
                    toUrl: '@T(Res.In("CKEditor").Of("Editor").Name("LinkToUrl"))',
                    toAnchor: '@T(Res.In("CKEditor").Of("Editor").Name("LinkToAnchor"))',
                    toEmail: '@T(Res.In("CKEditor").Of("Editor").Name("LinkToEmail"))',
                    targetFrame: '@T(Res.In("CKEditor").Of("Editor").Name("LinkTgtFrame"))',
                    targetPopup: '@T(Res.In("CKEditor").Of("Editor").Name("LinkTgtPopup"))',
                    targetFrameName: '@T(Res.In("CKEditor").Of("Editor").Name("LinkTgtFrameName"))',
                    targetPopupName: '@T(Res.In("CKEditor").Of("Editor").Name("LinkTgtPopupName"))',
                    popupFeatures: '@T(Res.In("CKEditor").Of("Editor").Name("LinkPopupFeatures"))',
                    popupResizable: '@T(Res.In("CKEditor").Of("Editor").Name("LinkPopupResizable"))',
                    popupStatusBar: '@T(Res.In("CKEditor").Of("Editor").Name("LinkPopupStatusBar"))',
                    popupLocationBar: '@T(Res.In("CKEditor").Of("Editor").Name("LinkPopupLocationBar"))',
                    popupToolbar: '@T(Res.In("CKEditor").Of("Editor").Name("LinkPopupToolbar"))',
                    popupMenuBar: '@T(Res.In("CKEditor").Of("Editor").Name("LinkPopupMenuBar"))',
                    popupFullScreen: '@T(Res.In("CKEditor").Of("Editor").Name("LinkPopupFullScreen"))',
                    popupScrollBars: '@T(Res.In("CKEditor").Of("Editor").Name("LinkPopupScrollBar"))',
                    popupDependent: '@T(Res.In("CKEditor").Of("Editor").Name("LinkPopupDependent"))',
                    popupLeft: '@T(Res.In("CKEditor").Of("Editor").Name("LinkPopupLeft"))',
                    popupTop: '@T(Res.In("CKEditor").Of("Editor").Name("LinkPopupTop"))',
                    id: '@T(Res.In("CKEditor").Of("Editor").Name("LinkId"))',
                    langDir: '@T(Res.In("CKEditor").Of("Editor").Name("LinkLangDir"))',
                    langDirLTR: '@T(Res.In("CKEditor").Of("Editor").Name("LinkLangDirLTR"))',
                    langDirRTL: '@T(Res.In("CKEditor").Of("Editor").Name("LinkLangDirRTL"))',
                    acccessKey: '@T(Res.In("CKEditor").Of("Editor").Name("LinkAccessKey"))',
                    name: '@T(Res.In("CKEditor").Of("Editor").Name("LinkName"))',
                    langCode: '@T(Res.In("CKEditor").Of("Editor").Name("LinkLangCode"))',
                    tabIndex: '@T(Res.In("CKEditor").Of("Editor").Name("LinkTabIndex"))',
                    advisoryTitle: '@T(Res.In("CKEditor").Of("Editor").Name("LinkAdvTitle"))',
                    advisoryContentType: '@T(Res.In("CKEditor").Of("Editor").Name("LinkAdvContentType"))',
                    cssClasses: '@T(Res.In("CKEditor").Of("Editor").Name("LinkCssClasses"))',
                    charset: '@T(Res.In("CKEditor").Of("Editor").Name("LinkCharset"))',
                    styles: '@T(Res.In("CKEditor").Of("Editor").Name("LinkStyle"))',
                    rel: '@T(Res.In("CKEditor").Of("Editor").Name("LinkRel"))',
                    selectAnchor: '@T(Res.In("CKEditor").Of("Editor").Name("LinkSelectAnchor"))',
                    anchorName: '@T(Res.In("CKEditor").Of("Editor").Name("LinkAnchorName"))',
                    anchorId: '@T(Res.In("CKEditor").Of("Editor").Name("LinkAnchorId"))',
                    emailAddress: '@T(Res.In("CKEditor").Of("Editor").Name("LinkEmailAddr"))',
                    emailSubject: '@T(Res.In("CKEditor").Of("Editor").Name("LinkEmailSubj"))',
                    emailBody: '@T(Res.In("CKEditor").Of("Editor").Name("LinkEmailBody"))',
                    noAnchors: '@T(Res.In("CKEditor").Of("Editor").Name("LinkNoAnchors"))',
                    noUrl: '@T(Res.In("CKEditor").Of("Editor").Name("LinkNoUrl"))',
                    noEmail: '@T(Res.In("CKEditor").Of("Editor").Name("LinkNoEmail"))'
                },
                anchor: {
                    toolbar: '@T(Res.In("CKEditor").Of("Editor").Name("Anchor"))',
                    menu: '@T(Res.In("CKEditor").Of("Editor").Name("Anchor"))',
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("Anchor"))',
                    name: '@T(Res.In("CKEditor").Of("Editor").Name("AnchorName"))',
                    errorName: '@T(Res.In("CKEditor").Of("Editor").Name("AnchorErrName"))',
                    remove: '@T(Res.In("CKEditor").Of("Editor").Name("AnchorRemove"))'
                },
                list: {
                    numberedTitle: '@T(Res.In("CKEditor").Of("Editor").Name("ListNumbered"))',
                    bulletedTitle: '@T(Res.In("CKEditor").Of("Editor").Name("ListBulleted"))',
                    type: '@T(Res.In("CKEditor").Of("Editor").Name("ListType"))',
                    start: '@T(Res.In("CKEditor").Of("Editor").Name("ListStart"))',
                    validateStartNumber: '@T(Res.In("CKEditor").Of("Editor").Name("ListValidateStartNum"))',
                    circle: '@T(Res.In("CKEditor").Of("Editor").Name("ListCircle"))',
                    disc: '@T(Res.In("CKEditor").Of("Editor").Name("ListDisc"))',
                    square: '@T(Res.In("CKEditor").Of("Editor").Name("ListSquare"))',
                    none: '@T(Res.In("CKEditor").Of("Editor").Name("ListNone"))',
                    notset: '@T(Res.In("CKEditor").Of("Editor").Name("ListNotSet"))',
                    armenian: '@T(Res.In("CKEditor").Of("Editor").Name("ListArmenian"))',
                    georgian: '@T(Res.In("CKEditor").Of("Editor").Name("ListGeorgian"))',
                    lowerRoman: '@T(Res.In("CKEditor").Of("Editor").Name("ListLowerRoman"))',
                    upperRoman: '@T(Res.In("CKEditor").Of("Editor").Name("ListUpperRoman"))',
                    lowerAlpha: '@T(Res.In("CKEditor").Of("Editor").Name("ListLowerAlpha"))',
                    upperAlpha: '@T(Res.In("CKEditor").Of("Editor").Name("ListUpperAlpha"))',
                    lowerGreek: '@T(Res.In("CKEditor").Of("Editor").Name("ListLowerGreek"))',
                    decimal: '@T(Res.In("CKEditor").Of("Editor").Name("ListDecimal"))',
                    decimalLeadingZero: '@T(Res.In("CKEditor").Of("Editor").Name("ListDecimalZero"))'
                },
                findAndReplace: {
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("FindReplace"))',
                    find: '@T(Res.In("CKEditor").Of("Editor").Name("Find"))',
                    replace: '@T(Res.In("CKEditor").Of("Editor").Name("Replace"))',
                    findWhat: '@T(Res.In("CKEditor").Of("Editor").Name("FindWhat"))',
                    replaceWith: '@T(Res.In("CKEditor").Of("Editor").Name("ReplaceWith"))',
                    notFoundMsg: '@T(Res.In("CKEditor").Of("Editor").Name("FindReplaceNotFound"))',
                    matchCase: '@T(Res.In("CKEditor").Of("Editor").Name("FindReplaceMatchCase"))',
                    matchWord: '@T(Res.In("CKEditor").Of("Editor").Name("FindReplaceMatchWord"))',
                    matchCyclic: '@T(Res.In("CKEditor").Of("Editor").Name("FindReplaceMatchCyclic"))',
                    replaceAll: '@T(Res.In("CKEditor").Of("Editor").Name("ReplaceAll"))',
                    replaceSuccessMsg: '@T(Res.In("CKEditor").Of("Editor").Name("ReplaceSuccess"))'
                },
                table: {
                    toolbar: '@T(Res.In("CKEditor").Of("Editor").Name("Table"))',
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("Table"))',
                    menu: '@T(Res.In("CKEditor").Of("Editor").Name("Table"))',
                    deleteTable: '@T(Res.In("CKEditor").Of("Editor").Name("TableDel"))',
                    rows: '@T(Res.In("CKEditor").Of("Editor").Name("TableRows"))',
                    columns: '@T(Res.In("CKEditor").Of("Editor").Name("TableColumns"))',
                    border: '@T(Res.In("CKEditor").Of("Editor").Name("TableBorder"))',
                    widthPx: '@T(Res.In("CKEditor").Of("Editor").Name("TableWidthPx"))',
                    widthPc: '@T(Res.In("CKEditor").Of("Editor").Name("TableWidthPc"))',
                    widthUnit: '@T(Res.In("CKEditor").Of("Editor").Name("TableWidthUnit"))',
                    cellSpace: '@T(Res.In("CKEditor").Of("Editor").Name("TableCellSpace"))',
                    cellPad: '@T(Res.In("CKEditor").Of("Editor").Name("TableCellPad"))',
                    caption: '@T(Res.In("CKEditor").Of("Editor").Name("TableCaption"))',
                    summary: '@T(Res.In("CKEditor").Of("Editor").Name("TableSummary"))',
                    headers: '@T(Res.In("CKEditor").Of("Editor").Name("TableHeaders"))',
                    headersNone: '@T(Res.In("CKEditor").Of("Editor").Name("TableHeadersNone"))',
                    headersColumn: '@T(Res.In("CKEditor").Of("Editor").Name("TableHeadersCol"))',
                    headersRow: '@T(Res.In("CKEditor").Of("Editor").Name("TableHeadersRow"))',
                    headersBoth: '@T(Res.In("CKEditor").Of("Editor").Name("TableHeadersBoth"))',
                    invalidRows: '@T(Res.In("CKEditor").Of("Editor").Name("TableInvalidRows"))',
                    invalidCols: '@T(Res.In("CKEditor").Of("Editor").Name("TableInvalidCols"))',
                    invalidBorder: '@T(Res.In("CKEditor").Of("Editor").Name("TableInvalidBorder"))',
                    invalidWidth: '@T(Res.In("CKEditor").Of("Editor").Name("TableInvalidWidth"))',
                    invalidHeight: '@T(Res.In("CKEditor").Of("Editor").Name("TableInvalidHeight"))',
                    invalidCellSpacing: '@T(Res.In("CKEditor").Of("Editor").Name("TableInvalidCellSpace"))',
                    invalidCellPadding: '@T(Res.In("CKEditor").Of("Editor").Name("TableInvalidCellPad"))',
                    cell: {
                        menu: '@T(Res.In("CKEditor").Of("Editor").Name("Cell"))',
                        insertBefore: '@T(Res.In("CKEditor").Of("Editor").Name("CellInsertBefore"))',
                        insertAfter: '@T(Res.In("CKEditor").Of("Editor").Name("CellInsertAfter"))',
                        deleteCell: '@T(Res.In("CKEditor").Of("Editor").Name("CellDel"))',
                        merge: '@T(Res.In("CKEditor").Of("Editor").Name("CellMerge"))',
                        mergeRight: '@T(Res.In("CKEditor").Of("Editor").Name("CellMergeRight"))',
                        mergeDown: '@T(Res.In("CKEditor").Of("Editor").Name("CellMergeDown"))',
                        splitHorizontal: '@T(Res.In("CKEditor").Of("Editor").Name("CellSplitH"))',
                        splitVertical: '@T(Res.In("CKEditor").Of("Editor").Name("CellSplitV"))',
                        title: '@T(Res.In("CKEditor").Of("Editor").Name("Cell"))',
                        cellType: '@T(Res.In("CKEditor").Of("Editor").Name("CellType"))',
                        rowSpan: '@T(Res.In("CKEditor").Of("Editor").Name("CellRowSpan"))',
                        colSpan: '@T(Res.In("CKEditor").Of("Editor").Name("CellColSpan"))',
                        wordWrap: '@T(Res.In("CKEditor").Of("Editor").Name("CellWordWrap"))',
                        hAlign: '@T(Res.In("CKEditor").Of("Editor").Name("CellAlignH"))',
                        vAlign: '@T(Res.In("CKEditor").Of("Editor").Name("CellAlignV"))',
                        alignBaseline: '@T(Res.In("CKEditor").Of("Editor").Name("CellAlignBase"))',
                        bgColor: '@T(Res.In("CKEditor").Of("Editor").Name("CellBgColor"))',
                        borderColor: '@T(Res.In("CKEditor").Of("Editor").Name("CellBorderColor"))',
                        data: '@T(Res.In("CKEditor").Of("Editor").Name("CellData"))',
                        header: '@T(Res.In("CKEditor").Of("Editor").Name("CellHeader"))',
                        yes: '@T(Res.In("CKEditor").Of("Editor").Name("CellYes"))',
                        no: '@T(Res.In("CKEditor").Of("Editor").Name("CellNo"))',
                        invalidWidth: '@T(Res.In("CKEditor").Of("Editor").Name("CellInvalidWidth"))',
                        invalidHeight: '@T(Res.In("CKEditor").Of("Editor").Name("CellInvalidHeight"))',
                        invalidRowSpan: '@T(Res.In("CKEditor").Of("Editor").Name("CellInvalidRowSpan"))',
                        invalidColSpan: '@T(Res.In("CKEditor").Of("Editor").Name("CellInvalidColSpan"))',
                        chooseColor: '@T(Res.In("CKEditor").Of("Editor").Name("CellChooseColor"))'
                    },
                    row: {
                        menu: '@T(Res.In("CKEditor").Of("Editor").Name("Row"))',
                        insertBefore: '@T(Res.In("CKEditor").Of("Editor").Name("RowInsertBefore"))',
                        insertAfter: '@T(Res.In("CKEditor").Of("Editor").Name("RowInsertAfter"))',
                        deleteRow: '@T(Res.In("CKEditor").Of("Editor").Name("RowDel"))'
                    },
                    column: {
                        menu: '@T(Res.In("CKEditor").Of("Editor").Name("Col"))',
                        insertBefore: '@T(Res.In("CKEditor").Of("Editor").Name("ColInsertBefore"))',
                        insertAfter: '@T(Res.In("CKEditor").Of("Editor").Name("ColInsertAfter"))',
                        deleteRow: '@T(Res.In("CKEditor").Of("Editor").Name("ColDel"))'
                    }
                },
                image: {
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("Img"))',
                    titleButton: '@T(Res.In("CKEditor").Of("Editor").Name("ImgBtn"))',
                    menu: '@T(Res.In("CKEditor").Of("Editor").Name("Img"))',
                    infoTab: '@T(Res.In("CKEditor").Of("Editor").Name("Img"))',
                    btnUpload: '@T(Res.In("CKEditor").Of("Editor").Name("ImgBtnUpl"))',
                    upload: '@T(Res.In("CKEditor").Of("Editor").Name("ImgBtnUpl"))',
                    alt: '@T(Res.In("CKEditor").Of("Editor").Name("ImgAlt"))',
                    lockRatio: '@T(Res.In("CKEditor").Of("Editor").Name("ImgLockRatio"))',
                    resetSize: '@T(Res.In("CKEditor").Of("Editor").Name("ImgRstSize"))',
                    border: '@T(Res.In("CKEditor").Of("Editor").Name("ImgBorder"))',
                    hSpace: '@T(Res.In("CKEditor").Of("Editor").Name("ImgHSpace"))',
                    vSpace: '@T(Res.In("CKEditor").Of("Editor").Name("ImgVSpace"))',
                    alertUrl: '@T(Res.In("CKEditor").Of("Editor").Name("ImgAlertUrl"))',
                    linkTab: '@T(Res.In("CKEditor").Of("Editor").Name("ImgLnk"))',
                    button2Img: '@T(Res.In("CKEditor").Of("Editor").Name("ImgToBtn"))',
                    img2Button: '@T(Res.In("CKEditor").Of("Editor").Name("ImgFromBtn"))',
                    urlMissing: '@T(Res.In("CKEditor").Of("Editor").Name("ImgUrlMissing"))',
                    validateBorder: '@T(Res.In("CKEditor").Of("Editor").Name("ImgValidateBorder"))',
                    validateHSpace: '@T(Res.In("CKEditor").Of("Editor").Name("ImgValidateHSpace"))',
                    validateVSpace: '@T(Res.In("CKEditor").Of("Editor").Name("ImgValidateVSpace"))'
                },
                flash: {
                    properties: '@T(Res.In("CKEditor").Of("Editor").Name("Flash"))',
                    propertiesTab: '@T(Res.In("CKEditor").Of("Editor").Name("FlashProp"))',
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("Flash"))',
                    chkPlay: '@T(Res.In("CKEditor").Of("Editor").Name("FlashChkPlay"))',
                    chkLoop: '@T(Res.In("CKEditor").Of("Editor").Name("FlashChkLoop"))',
                    chkMenu: '@T(Res.In("CKEditor").Of("Editor").Name("FlashChkMenu"))',
                    chkFull: '@T(Res.In("CKEditor").Of("Editor").Name("FlashChkFull"))',
                    scale: '@T(Res.In("CKEditor").Of("Editor").Name("FlashScale"))',
                    scaleAll: '@T(Res.In("CKEditor").Of("Editor").Name("FlashScaleAll"))',
                    scaleNoBorder: '@T(Res.In("CKEditor").Of("Editor").Name("FlashScaleNoBorder"))',
                    scaleFit: '@T(Res.In("CKEditor").Of("Editor").Name("FlashScaleFit"))',
                    access: '@T(Res.In("CKEditor").Of("Editor").Name("FlashAccess"))',
                    accessAlways: '@T(Res.In("CKEditor").Of("Editor").Name("FlashAccessAlways"))',
                    accessSameDomain: '@T(Res.In("CKEditor").Of("Editor").Name("FlashAccessDomain"))',
                    accessNever: '@T(Res.In("CKEditor").Of("Editor").Name("FlashAccessNever"))',
                    alignAbsBottom: '@T(Res.In("CKEditor").Of("Editor").Name("FlashAlignAbsBottom"))',
                    alignAbsMiddle: '@T(Res.In("CKEditor").Of("Editor").Name("FlashAlignAbsMiddle"))',
                    alignBaseline: '@T(Res.In("CKEditor").Of("Editor").Name("FlashAlignBaseline"))',
                    alignTextTop: '@T(Res.In("CKEditor").Of("Editor").Name("FlashAlignTextTop"))',
                    quality: '@T(Res.In("CKEditor").Of("Editor").Name("FlashQual"))',
                    qualityBest: '@T(Res.In("CKEditor").Of("Editor").Name("FlashQualBest"))',
                    qualityHigh: '@T(Res.In("CKEditor").Of("Editor").Name("FlashQualHigh"))',
                    qualityAutoHigh: '@T(Res.In("CKEditor").Of("Editor").Name("FlashQualAutoHigh"))',
                    qualityMedium: '@T(Res.In("CKEditor").Of("Editor").Name("FlashQualMedium"))',
                    qualityAutoLow: '@T(Res.In("CKEditor").Of("Editor").Name("FlashQualAuto"))',
                    qualityLow: '@T(Res.In("CKEditor").Of("Editor").Name("FlashQualLow"))',
                    windowModeWindow: '@T(Res.In("CKEditor").Of("Editor").Name("FlashModeWnd"))',
                    windowModeOpaque: '@T(Res.In("CKEditor").Of("Editor").Name("FlashModeWndOpaque"))',
                    windowModeTransparent: '@T(Res.In("CKEditor").Of("Editor").Name("FlashModeWndTransparent"))',
                    windowMode: '@T(Res.In("CKEditor").Of("Editor").Name("FlashModeWnd"))',
                    flashvars: '@T(Res.In("CKEditor").Of("Editor").Name("FlashVars"))',
                    bgcolor: '@T(Res.In("CKEditor").Of("Editor").Name("FlashBgColor"))',
                    hSpace: '@T(Res.In("CKEditor").Of("Editor").Name("FlashHSpace"))',
                    vSpace: '@T(Res.In("CKEditor").Of("Editor").Name("FlashVSpace"))',
                    validateSrc: '@T(Res.In("CKEditor").Of("Editor").Name("FlashValidateSrc"))',
                    validateHSpace: '@T(Res.In("CKEditor").Of("Editor").Name("FlashValidateHSpace"))',
                    validateVSpace: '@T(Res.In("CKEditor").Of("Editor").Name("FlashValidateVSpace"))'
                },
                spellCheck: {
                    toolbar: '@T(Res.In("CKEditor").Of("Editor").Name("SpellCheck"))'
                },
                elementsPath: {
                    eleLabel: '@T(Res.In("CKEditor").Of("Editor").Name("ElPathLbl"))',
                    eleTitle: '@T(Res.In("CKEditor").Of("Editor").Name("ElPathTitle"))'
                },
                numberedlist: '@T(Res.In("CKEditor").Of("Editor").Name("NumList"))',
                bulletedlist: '@T(Res.In("CKEditor").Of("Editor").Name("BulList"))',
                indent: '@T(Res.In("CKEditor").Of("Editor").Name("Indent"))',
                outdent: '@T(Res.In("CKEditor").Of("Editor").Name("Outdent"))',
                justify: {
                    left: '@T(Res.In("CKEditor").Of("Editor").Name("JustifyLeft"))',
                    center: '@T(Res.In("CKEditor").Of("Editor").Name("JustifyCenter"))',
                    right: '@T(Res.In("CKEditor").Of("Editor").Name("JustifyRight"))',
                    block: '@T(Res.In("CKEditor").Of("Editor").Name("JustifyBlock"))'
                },
                blockquote: '@T(Res.In("CKEditor").Of("Editor").Name("BlockQuote"))',
                clipboard: {
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("Clipboard"))',
                    cutError: '@T(Res.In("CKEditor").Of("Editor").Name("ClipboardCutErr"))',
                    copyError: '@T(Res.In("CKEditor").Of("Editor").Name("ClipboardCopyErr"))',
                    pasteMsg: '@T(Res.In("CKEditor").Of("Editor").Name("ClipboardPasteMsg"))',
                    securityMsg: '@T(Res.In("CKEditor").Of("Editor").Name("ClipboardSecMsg"))',
                    pasteArea: '@T(Res.In("CKEditor").Of("Editor").Name("ClipboardPasteArea"))'
                },
                pastefromword: {
                    confirmCleanup: '@T(Res.In("CKEditor").Of("Editor").Name("MsWordCleanup"))',
                    toolbar: '@T(Res.In("CKEditor").Of("Editor").Name("MsWord"))',
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("MsWord"))',
                    error: '@T(Res.In("CKEditor").Of("Editor").Name("MsWordErr"))'
                },
                pasteText: {
                    button: '@T(Res.In("CKEditor").Of("Editor").Name("Plain"))',
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("Plain"))'
                },
                showBlocks: '@T(Res.In("CKEditor").Of("Editor").Name("ShowBlocks"))',
                stylesCombo: {
                    label: '@T(Res.In("CKEditor").Of("Editor").Name("StylesCombo"))',
                    panelTitle: '@T(Res.In("CKEditor").Of("Editor").Name("StylesComboPnl"))',
                    panelTitle1: '@T(Res.In("CKEditor").Of("Editor").Name("StylesComboPnl1"))',
                    panelTitle2: '@T(Res.In("CKEditor").Of("Editor").Name("StylesComboPnl2"))',
                    panelTitle3: '@T(Res.In("CKEditor").Of("Editor").Name("StylesComboPnl3"))'
                },
                format: {
                    label: '@T(Res.In("CKEditor").Of("Editor").Name("Fmt"))',
                    panelTitle: '@T(Res.In("CKEditor").Of("Editor").Name("FmtPnl"))',
                    tag_p: '@T(Res.In("CKEditor").Of("Editor").Name("FmtP"))',
                    tag_pre: '@T(Res.In("CKEditor").Of("Editor").Name("FmtPre"))',
                    tag_address: '@T(Res.In("CKEditor").Of("Editor").Name("FmtAddr"))',
                    tag_h1: '@T(Res.In("CKEditor").Of("Editor").Name("FmtH1"))',
                    tag_h2: '@T(Res.In("CKEditor").Of("Editor").Name("FmtH2"))',
                    tag_h3: '@T(Res.In("CKEditor").Of("Editor").Name("FmtH3"))',
                    tag_h4: '@T(Res.In("CKEditor").Of("Editor").Name("FmtH4"))',
                    tag_h5: '@T(Res.In("CKEditor").Of("Editor").Name("FmtH5"))',
                    tag_h6: '@T(Res.In("CKEditor").Of("Editor").Name("FmtH6"))',
                    tag_div: '@T(Res.In("CKEditor").Of("Editor").Name("FmtDiv"))'
                },
                div: {
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("Div"))',
                    toolbar: '@T(Res.In("CKEditor").Of("Editor").Name("Div"))',
                    cssClassInputLabel: '@T(Res.In("CKEditor").Of("Editor").Name("DivCssClass"))',
                    styleSelectLabel: '@T(Res.In("CKEditor").Of("Editor").Name("DivCssStyle"))',
                    IdInputLabel: '@T(Res.In("CKEditor").Of("Editor").Name("DivId"))',
                    languageCodeInputLabel: ' @T(Res.In("CKEditor").Of("Editor").Name("DivLangCode"))',
                    inlineStyleInputLabel: '@T(Res.In("CKEditor").Of("Editor").Name("DivInlineStyle"))',
                    advisoryTitleInputLabel: '@T(Res.In("CKEditor").Of("Editor").Name("DivAdvTitle"))',
                    langDirLabel: '@T(Res.In("CKEditor").Of("Editor").Name("DivLangDir"))',
                    langDirLTRLabel: '@T(Res.In("CKEditor").Of("Editor").Name("DivLangDirLtr"))',
                    langDirRTLLabel: '@T(Res.In("CKEditor").Of("Editor").Name("DivLangDirRtl"))',
                    edit: '@T(Res.In("CKEditor").Of("Editor").Name("DivEdit"))',
                    remove: '@T(Res.In("CKEditor").Of("Editor").Name("DivRemove"))'
                },
                font: {
                    label: '@T(Res.In("CKEditor").Of("Editor").Name("Font"))',
                    voiceLabel: '@T(Res.In("CKEditor").Of("Editor").Name("Font"))',
                    panelTitle: '@T(Res.In("CKEditor").Of("Editor").Name("Font"))'
                },
                fontSize: {
                    label: '@T(Res.In("CKEditor").Of("Editor").Name("FontSize"))',
                    voiceLabel: '@T(Res.In("CKEditor").Of("Editor").Name("FontSize"))',
                    panelTitle: '@T(Res.In("CKEditor").Of("Editor").Name("FontSize"))'
                },
                colorButton: {
                    textColorTitle: '@T(Res.In("CKEditor").Of("Editor").Name("ColorTxt"))',
                    bgColorTitle: '@T(Res.In("CKEditor").Of("Editor").Name("ColorBg"))',
                    panelTitle: '@T(Res.In("CKEditor").Of("Editor").Name("ColorPnl"))',
                    auto: '@T(Res.In("CKEditor").Of("Editor").Name("ColorAuto"))',
                    more: '@T(Res.In("CKEditor").Of("Editor").Name("ColorMore"))'
                },
                colors: {},
                maximize: '@T(Res.In("CKEditor").Of("Editor").Name("Maximize"))',
                minimize: '@T(Res.In("CKEditor").Of("Editor").Name("Minimize"))',
                fakeobjects: {
                    anchor: '@T(Res.In("CKEditor").Of("Editor").Name("FakeAnchor"))',
                    flash: '@T(Res.In("CKEditor").Of("Editor").Name("FakeFlash"))',
                    iframe: '@T(Res.In("CKEditor").Of("Editor").Name("FakeIFrame"))',
                    hiddenfield: '@T(Res.In("CKEditor").Of("Editor").Name("FakeHidden"))',
                    unknown: '@T(Res.In("CKEditor").Of("Editor").Name("FakeUnknown"))'
                },
                resize: '@T(Res.In("CKEditor").Of("Editor").Name("Resize"))',
                colordialog: {
                    title: '@T(Res.In("CKEditor").Of("Editor").Name("ColorDlg"))',
                    options: '@T(Res.In("CKEditor").Of("Editor").Name("ColorDlgOpt"))',
                    highlight: '@T(Res.In("CKEditor").Of("Editor").Name("ColorDlgHighlight"))',
                    selected: '@T(Res.In("CKEditor").Of("Editor").Name("ColorDlgSelected"))',
                    clear: '@T(Res.In("CKEditor").Of("Editor").Name("ColorDlgClear"))'
                },
                toolbarCollapse: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarCollapse"))',
                toolbarExpand: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarExpand"))',
                toolbarGroups: {
                    document: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarDoc"))',
                    clipboard: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarClipboard"))',
                    editing: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarEditing"))',
                    basicstyles: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarBasicStyles"))',
                    paragraph: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarParagraph"))',
                    links: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarLinks"))',
                    insert: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarInsert"))',
                    styles: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarStyles"))',
                    colors: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarColors"))',
                    tools: '@T(Res.In("CKEditor").Of("Editor").Name("ToolbarTools"))'
                },
                bidi: {
                    ltr: '@T(Res.In("CKEditor").Of("Editor").Name("BidiLtr"))',
                    rtl: '@T(Res.In("CKEditor").Of("Editor").Name("BidiRtl"))'
                }
            };
        </script>
    }
}
@{
    string theme = Svc.Config(Par.In("WebPortal").Name("Theme"), "Default");
    foreach(var bundle in Bundles.Reverse())
    {
        string stylePath = String.Format("~/bundles/{0}/styles/{1}", theme, bundle)
            .ToLowerInvariant();
        if(BundleTable.Bundles.Any(x => x.Path == stylePath))
        {
            @Styles.Render(stylePath)
        }
        string scriptPath = String.Format("~/bundles/{0}/scripts/{1}", theme, bundle)
            .ToLowerInvariant();
        if(BundleTable.Bundles.Any(x => x.Path == scriptPath))
        {
            @PreScript(bundle)
            @Scripts.Render(scriptPath)
            @PostScript(bundle)
        }
    }
}

